package friend

import (
	"context"
	v1 "qiyu-contact/api/friend/v1"
	"qiyu-contact/internal/service"
)

func (f *FriendControllerV1) FindFriend(ctx context.Context, req *v1.FindFriendReq) (res *v1.FindFriendRes, err error) {
	friend, err := service.Friend().FindFriend(ctx, req)
	if err != nil {
		return nil, err
	}
	res = friend
	return
}
func (f *FriendControllerV1) DelFriend(ctx context.Context, req *v1.DelFriendReq) (res *v1.DelFriendRes, err error) {
	friend, err := service.Friend().DelFriend(ctx, req)
	if err != nil {
		return nil, err
	}
	res = friend
	return
}
func (f *FriendControllerV1) BlockFriend(ctx context.Context, req *v1.BlockFriendReq) (res *v1.BlockFriendRes, err error) {
	friend, err := service.Friend().BlockFriend(ctx, req)
	if err != nil {
		return nil, err
	}
	res = friend
	return
}
func (f *FriendControllerV1) AddFriend(ctx context.Context, req *v1.AddFriendReq) (res *v1.AddFriendRes, err error) {
	friend, err := service.Friend().AddFriend(ctx, req)
	if err != nil {
		return nil, err
	}
	res = friend
	return
}
